using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace PureStateMachine
{
    public abstract class PState
    {
        protected PStateBrain _brain;
        protected PBlackboard Blackboard => _brain.Blackboard;
        
        public abstract string Name { get; }
        public abstract void StateInit();
        public abstract void StateStart();
        public abstract void StateUpdate();
        public abstract void StateEnd();

        public PState(PStateBrain brain)
        {
            _brain = brain;
        }

        protected void TransferTo(string targetStateName)
        {
            _brain.TransferTo(targetStateName);
        }
    }
}